package com.dmap.admin.service.backgroundv2;

import com.dmap.admin.controller.backgroundv2.param.DeviceParam;
import com.dmap.admin.controller.backgroundv2.param.DeviceSelectParam;
import com.dmap.admin.po.Device;

import java.util.List;

/**
 * \* User: helei
 * \* Date: 27/05/18
 * \* Description:设备相关接口
 * \
 */
public interface DeviceService {

    Device insertDevice(DeviceParam param);

    boolean updateDevice(DeviceParam param);

    /**
     * 验证 Name 或 Firmware 是否已存在
     *
     * @param firmware   设备固件编号
     * @param deviceName 设备名称
     * @return
     */
    boolean validateFirmwareOrNameIsExist(String firmware, String deviceName);

    Device selectById(Long id);

    List<Device> selectByCompanyId(Long companyId);

    int countByDeviceSelectParam(DeviceSelectParam param);

    List<Device> selectByDeviceSelectParam(DeviceSelectParam param);

    int countByDeviceTypeId(Long deviceTypeId);

}